//
// Created by masaikk on 2021/4/29.
//

#ifndef CT_VEC1_H
#define CT_VEC1_H
#include <iostream>
#include <vector>
using namespace std;

class Vec1{
private:
    vector<int> vector;
public:
    Vec1(){
//        this->vector=new std::vector<int>();
    }

    void showElems(){
        for(int i=0;i<this->vector.size();i++){
            printf("%d\n", this->vector[i]);
        }
    }

    void showElemByIter(){


    }

    void addElem(){
        vector.push_back(1);
        vector.push_back(2);
        vector.push_back(3);
    }

    void testInsert(){
        vector.insert(vector.begin()+1,99);
    }

    void execu1(){
        this->addElem();
        this->showElems();
    }

    void execu2(){
        this->addElem();
        this->testInsert();
        this->showElems();
    }
    void execu3(){
        this->execu1();
        vector.reserve(3);
        this->showElems();
    }
};

#endif //CT_VEC1_H
